package com.olda.play.enums;

/**
 * 通用返回枚举值
 */
public enum ResponseCode {
    SUCCESS("200", "返回成功", "返回成功", "Return Success"),

    FAIL("500", "返回失败", "返回失敗", "Return Failed"),

    SERVICE_UNAVAILABLE("503", "服务器未响应", "服務器未響應", "Service Unavailable"),

    ILLEGAL_ARGUMENT("400", "非法参数", "非法參數", "Illegal Argument"),

    UNAUTHORIZED("401", "认证失败", "認證失敗", "Unauthorized"),

    FORBIDDEN("403", "禁止访问", "Forbidden"),

    TOKEN_EXPIRED("410", "访问令牌已过期", "Token Expired"),

    INCORRECTCREDENTIAL("428", "用户名或密码错误", "User name or password is incorrect"),

    USER_NOT_EXIST("5002", "用户不存在",""),
    ONLY_POST("400", "仅允许post请求",""),

    ACCESS_UNAUTHORIZED("5003", "访问未授权"),

    TOKEN_INVALID_OR_EXPIRED("5004", "token无效或已过期"),
    TOKEN_ACCESS_FORBIDDEN("5005", "token已被禁止访问"),


    HAS_NO_DATA("50000", "数据不存在"),
    MORE_DICT("60000", "数据字典项重复,请更换字典编码"),
    MORE_DEPT("60001", "部门名称重复,请更换部门名称"),
    MORE_ROLE("60001", "角色编码重复,请更换角色编码"),


    DATABASE_ERROR("5001", "数据库错误", "數據庫錯誤", "Database error");

    private final String code;

    private final String message;

    private String enMessage = "";

    private String tcMessage = "";

    ResponseCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    ResponseCode(String code, String message, String enMessage) {
        this.code = code;
        this.message = message;
        this.enMessage = enMessage;
    }

    ResponseCode(String code, String message, String tcMessage, String enMessage) {
        this.code = code;
        this.message = message;
        this.tcMessage = tcMessage;
        this.enMessage = enMessage;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public String getTcMessage() {
        return tcMessage;
    }

    public String getEnMessage() {
        return enMessage;
    }


}
